#include <iostream> 
#include <string>
#include <map>
//#include <algorithm>

using namespace std; 

int main (){

	int num_ent, number;

	map <string,int> list_tel;
	map <string,int>::iterator it;
 
	string name, name_f="inicio";

while(1)
{
	list_tel.begin();

	cout << endl<< "Nombre: "<<endl; 
	cin >> name_f;

	if(name_f=="finalizar") {return 0;} 
	it=list_tel.find(name_f);

	if(it==list_tel.end())
	{
		cout << endl << "Nuevo Registro. "<<endl<< "Introduzca número de " << name_f << ": "<< endl;
		cin >> number;
		list_tel[name_f]=number;
	}
	else
	{
		cout << list_tel.find(name_f)->second<< endl;
	}

}

return 0;
}

